<?php 

/*
 * required: root, administrator, none (member)
 * allow: user1|user2
 */
class menuLeftComponent extends sfComponent{
//class menuLeftAction extends sfAction{
	public function execute($request){
		$data = array();
		$data['menu_json'] 	= json_decode(file_get_contents(dirname(__FILE__).'/../../../config/admin.json'),true);
		$data['account']	= $this->getUser()->getAttribute('admin.accounts');
		if(count($data['account'])<=0){
			sfContext::getInstance()->getConfiguration()->loadHelpers('I18N');
			die(__('login_required'));
		}
		//echo '<pre>';print_r($data);die;
		//return $this->renderPartial('menuLeft',array('data'=>$data));
		$this->setVar('data', $data);
	}
}